<template>
  <el-container :class="$style.container">
    <el-aside v-show="displaySide" :class="$style['layer_aside']" width="200px">
      <layout-aside />
    </el-aside>
    <el-main :class="$style['main-container']">
      <!-- <Header v-if="displaySide" :routeName="($route.name)" :route="$route"></Header> -->
      <div :class="$style.content">
        <router-view />
      </div>
    </el-main>
  </el-container>
</template>

<script lang="ts">
import { defineComponent } from 'vue';
import LayoutAside from './components/LayoutAside.vue';
// import Header from './components/Header.vue'

export default defineComponent({
  components: {
    LayoutAside,
    // Header,
  },
  data() {
    return {
      displaySide: window.location.port == '6083' || window.location.port == '10003' ? false : true,
    }
  },
  created() {
    console.log(this, 'this');

  },
  computed: {
    matched() {
      return this.$route.matched
    },
    locale() {
      return this.$i18n.locale
    },
  },
})
</script>

<style lang="scss" module>
.container {
  height: calc(100vh - 60px);
}

.layer_aside {
  position: relative;
  width: auto !important;
  border-right: solid 1px #e6e6e6;
}

.tags-view-wrapper {
  background: #fff;
  flex: 0 36px;
  height: 34px;
  border-bottom: 1px solid #d8dce5;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 0 3px 0 rgba(0, 0, 0, 0.04);

  .tags-view-item {
    display: inline-block;
    position: relative;
    height: 26px;
    line-height: 26px;
    border-right: 1px solid #d8dce5;
    color: #495060;
    background: #fff;
    padding: 0 8px;
    font-size: 16px;
    margin-left: 5px;
    margin-top: 4px;

    &:first-of-type {
      margin-left: 15px;
    }

    &.active {

      // background-color: #42b983;
      // color: #999;
      // border-color: #42b983;
      &::before {
        content: '';
        background: #2c7dff;
        display: inline-block;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        position: relative;
        margin-right: 2px;
      }
    }
  }
}

.main-container {
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f5f7f9;

  .content {
    margin: 10px;
    flex: auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
}</style>
